package com.group02.community.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.group02.community.entity.user.SysMenu;
import com.group02.community.entity.vo.MenuVO;
import com.group02.community.entity.vo.queryVO.MenuQueryVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MenuMapper extends BaseMapper<SysMenu> {

    /**
     * 根据用户名获取菜单
     * @param username
     * @return
     */
    List<MenuVO> selectMenusByUsername(String username);

    /**
     * 查询所有菜单
     * @return
     */
    List<MenuVO> selectAllMenu(@Param("mq") MenuQueryVO mq);

    /**
     * 模糊查询
     * @param mq
     * @return
     */
    List<MenuVO> selectMenuByQuery(@Param("mq") MenuQueryVO mq);
}
